#ifndef doSPI_H
#define doSPI_H
#include <spi.h>

// Function Prototypes

// Externally-Used
unsigned int spiReadADC				  (unsigned char channel, unsigned char se_diff);

unsigned char 	spiEEpromReadByte     (unsigned int address);
void			spiEEpromReadArray	  (unsigned int address, unsigned char array_length, unsigned char return_array[]);
unsigned char	spiEEpromWriteByte    (unsigned int address, unsigned char data);
void			spiEEpromWritePage	  (unsigned int address, unsigned short int vals_to_write[]);
void			spiEEpromReadConfigByte (unsigned char[]);

void spiEEpromWriteEnable           (void);
void spiEEpromWriteDisable			(void);

unsigned char spiReadStatus   		(void);
void status_write       			(unsigned char data);

// Internally-used
void spiEEpromWriteWait (void);
void resetEEPROM		(unsigned int);


// Not currently used
//void page_write		(unsigned char addhigh, unsigned char addlow, unsigned char *wrptr);
//void array_read     (unsigned char addhigh, unsigned char addlow, unsigned char *rdptr, unsigned char count);




#endif